package arxiv;

// Model (data for a search)

public class KeywordData {

    private String keyText;
    private String authorText;
    private String titleText;
    private String numResultsText;


    // access current values of search data
    public String getKeyText() {
        return this.keyText;
    }

    public String getAuthorText() {
        return this.authorText;
    }

    public String getTitleText() {
        return this.titleText;
    }

    public String getNumResultsText() {
        return this.numResultsText;
    }

    public void setKeyText(String keyword) {
        this.keyText = keyword;
    }

    public void setAuthorText(String author) {
        this.authorText = author;
    }

    public void setTitleText(String title) {
        this.titleText = title;
    }

    public void setNumResultsText(String numResults) {
        this.numResultsText = numResults;
    }

    // test whether any data has been input
    public boolean hasQuery() {
        return ( (!keyText.isEmpty()) || (!authorText.isEmpty()) || (!titleText.isEmpty()) );
    }

}
